[gd_scene load_steps=9 format=2]

[sub_resource type="CubeMesh" id=1]

[sub_resource type="Shader" id=2]
code = "shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
uniform float specular;
uniform float metallic;
uniform float roughness : hint_range(0,1);
uniform float point_size : hint_range(0,128);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;


void vertex() {
	if (!OUTPUT_IS_SRGB) {
		COLOR.rgb = mix( pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb* (1.0 / 12.92), lessThan(COLOR.rgb,vec3(0.04045)) );
	}
	UV=UV*uv1_scale.xy+uv1_offset.xy;
}




void fragment() {
	vec2 base_uv = UV;
	vec4 albedo_tex = texture(texture_albedo,base_uv);
	albedo_tex *= COLOR;
	ALBEDO = albedo.rgb * albedo_tex.rgb;
	METALLIC = metallic;
	ROUGHNESS = roughness;
	SPECULAR = specular;
}
"

[sub_resource type="ShaderMaterial" id=3]
shader = SubResource( 2 )
shader_param/albedo = Color( 0.266667, 0.466667, 0.6, 1 )
shader_param/specular = 0.5
shader_param/metallic = 0.0
shader_param/roughness = 1.0
shader_param/point_size = 1.0
shader_param/uv1_scale = Vector3( 1, 1, 1 )
shader_param/uv1_offset = Vector3( 0, 0, 0 )
shader_param/uv2_scale = Vector3( 1, 1, 1 )
shader_param/uv2_offset = Vector3( 0, 0, 0 )

[sub_resource type="BoxShape" id=8]

[sub_resource type="CubeMesh" id=6]

[sub_resource type="SpatialMaterial" id=7]
albedo_color = Color( 0.2, 0.6, 0.4, 1 )

[sub_resource type="CubeMesh" id=4]

[sub_resource type="SpatialMaterial" id=5]
albedo_color = Color( 0.533333, 0.666667, 0.133333, 1 )

[node name="Spatial" type="Spatial"]

[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( -0.546918, -0.569285, -0.613837, -0.756466, 0.0219231, 0.653666, -0.358665, 0.821848, -0.442635, 0, 3, 0 )
light_color = Color( 1, 1, 0.866667, 1 )
light_energy = 1.7

[node name="Player" type="MeshInstance" parent="."]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 2, 0 )
mesh = SubResource( 1 )
material/0 = SubResource( 3 )

[node name="Camera" type="Camera" parent="Player"]
transform = Transform( -2, 1.13164e-07, -6.41782e-07, 0, 1.96962, 0.347296, 6.51683e-07, 0.347296, -1.96962, 0, 6, -10 )

[node name="RigidBody" type="RigidBody" parent="Player"]

[node name="CollisionShape" type="CollisionShape" parent="Player/RigidBody"]
shape = SubResource( 8 )

[node name="Grounds" type="Spatial" parent="."]

[node name="Ground-1" type="MeshInstance" parent="Grounds"]
transform = Transform( 100, 0, 0, 0, 0.05, 0, 0, 0, 100, 20, -2, 20 )
mesh = SubResource( 6 )
material/0 = SubResource( 7 )

[node name="Ground0" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 0, 0, 0 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground1" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 0, 2, 20 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground2" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 0, 4, 40 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground3" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 20, 6, 40 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground4" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 40, 8, 40 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground5" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 40, 10, 20 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground6" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 40, 12, 0 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="Ground7" type="MeshInstance" parent="Grounds"]
transform = Transform( 10, 0, 0, 0, 0.05, 0, 0, 0, 10, 20, 14, 0 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )
